<!--%import("filter/delete_all_data.xml")-->
<!--%import("filter/update_point.xml")-->
<!--%import("filter/fix_total_data.xml")-->
{@$position=1+($user_data->page-1)*20}

{$lang->attendance_search_help}<br/>{$lang->attendance_total_help}<br />
<!--//선택한 회원의 출석정보 재계산-->
<form action="./" method="POST" onsubmit="return procFilter(this, fix_total_data);" id="fixTotalData">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input type="hidden" name="type" value="{$type}" />
<input type="hidden" name="selected_date" value="{$selected_date}" />
<input type="hidden" name="member_srl" value ="" />
{$lang->attend_insert_continuity}<input type="text" name="continuity" value="1" class="inputTypeText w60" />
</form>

<!--//검색상자-->
<form action="./" method="get" class="adminSearch">
<input type="hidden" name="error_return_url" value="" />
<input type="hidden" name="mid" value="" />
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input type="hidden" name="type" value="{$type}" />
<input type="hidden" name="selected_date" value="{$selected_date}" />

    <fieldset>
        <select name="unjoined_members">
            <option value="" <!--@if(!$unjoined_members)-->selected="selected"<!--@end-->>{$lang->attendance_about_unjoined_member}</option>
            <option value="Y" <!--@if($unjoined_members)-->selected="selected"<!--@end-->>{$lang->attendance_unjoined_member}</option>
        </select>
        <select name="selected_group_srl">
            <option value="0">{$lang->group}</option>
            <!--@foreach($group_list as $key => $val)-->
            <option value="{$val->group_srl}" <!--@if($selected_group_srl==$val->group_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
            <!--@end-->
        </select>
        <select name="search_target">
            <option value="" <!--@if(!$search_target)-->selected="selected"<!--@end-->>{$lang->search_target}</option>
            <option value="user_id" <!--@if($search_target=='user_id')-->selected="selected"<!--@end-->>{$lang->user_id}</option>
            <option value="nick_name" <!--@if($search_target=='nick_name')-->selected="selected"<!--@end-->>{$lang->nick_name}</option>
            <option value="email_address" <!--@if($search_target=='user_id')-->selected="selected"<!--@end-->>{$lang->email}</option>
        </select>
        <input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" class="inputTypeText" />
        <span class="button"><input type="submit" value="{$lang->cmd_search}" /></span>
        <a href="#" onclick="location.href='{getUrl('','type',$type,'act',$act,'module',$module)}';return false;" class="button"><span>{$lang->cmd_cancel}</span></a>
    </fieldset>
</form>

<!--//선택한 회원의 모든 출석정보 삭제-->
<form action="./" method="POST" onsubmit="return procFilter(this, delete_all_data);" id="deleteAllData">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input type="hidden" name="type" value="{$type}" />
<input type="hidden" name="selected_date" value="{$selected_date}" />
<input type="hidden" name="member_srl" value ="" />
</form>

<table cellspacing="0" class="attendanceTable" >
	<tr>
		<th class="center" style="min-width:20px;">
			{$lang->position}
		</th>
		<td class="center">
			{$lang->email}
		</td>
		<th class="center">
			{$lang->nick_name}
		</th>
		<!--td class="center">
			{$lang->user_name}
		</td-->
		<th class="center">
			{$lang->view_total_day}
		</th>
		<td class="center" style="width:270px;">
			{$lang->view_total_point}
		</td>
        <th class="center" style="min-width:30px;">
            {$lang->attendance_perfectly_delete}
        </th>
	</tr>
<!--@foreach($user_data->data as $ranking)-->
<!--@if($position==1)-->{@$top = $ranking->total}<!--@end-->
{@$user_info = $oMemberModel->getMemberInfoByMemberSrl($ranking->member_srl)}
<tr>
	<th class="center"> 
		{$position}
	</th>
	<td class="center"> 
		{$user_info->email_address}
	</td>
	<th class="center"> 
		<div class="member_{$user_info->member_srl}">{$user_info->nick_name}</div>
	</th>
	<!--td class="center"> 
		{$user_info->user_name}
	</td-->
	<th class="center" ><a href="#fixTotalData" onclick="att_fix_total_data('{$ranking->member_srl}','{$lang->attend_fix_total_1}','{$lang->attend_fix_total_2}','{$user_info->nick_name}');">{$ranking->total}</a></th>
	<td style="width:270px;">
        {$ranking->total_point}
        <form action="./" method="get">
            <!--input type="text" name="orgpoint" value="{$ranking->total_point}" class="inputTypeText" readonly /-->
            <input type="text" id="point_{$ranking->member_srl}" name="point" class="inputTypeText" style="width:50px;" />
            <span class="button small"><input type="button" value="+" onclick="updatePoint('{$ranking->member_srl}', 'add')"/></span>
            <span class="button small"><input type="button" value="-" onclick="updatePoint('{$ranking->member_srl}', 'minus')"/></span>
            <span class="button small"><input type="button" value="{$lang->cmd_update}" onclick="updatePoint('{$ranking->member_srl}', 'update')" /></span>
        </form>
	</td>
    <th class="center">
        <a href="#deleteAllData" onclick="att_delete_all_data('{$ranking->member_srl}','{$user_info->nick_name}');">×</a>
    </th>
</tr>
{@$position++}
<!--@end-->
</table>

<form id="updateForm" action="./" method="POST">
    <input type="hidden" id="update_action" name="action" value="" />
    <input type="hidden" id="update_member_srl" name="member_srl" value="" />
    <input type="hidden" id="update_point" name="point" class="inputTypeText w80" />
</form>

<!--//페이지 네비게이션-->
<div class="pagination a1">
   <a href="{getUrl('page',$user_data->page_navigation->first_page,'module_srl','')}" class="prevEnd">{$lang->first_page}</a> 
    <!--@while($page_no = $user_data->page_navigation->getNextPage())-->
        <!--@if($user_data->page == $page_no)-->
            <strong>{$page_no}</strong> 
        <!--@else-->
            <a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a> 
        <!--@end-->
    <!--@end-->
    <a href="{getUrl('page',$user_data->page_navigation->last_page,'module_srl','')}" class="nextEnd">{$lang->last_page}</a>
</div>
